package main.java.com.service.impl;

import main.java.com.dao.LoginFrontDao;
import main.java.com.dao.impl.LoginFrontDaoImpl;
import main.java.com.entity.User;
import main.java.com.service.LoginFrontService;

import java.util.List;

public class LoginFrontServiceImpl implements LoginFrontService {

    LoginFrontDao loginFrontDao = new LoginFrontDaoImpl();

    /**
     * 登录
     * @param phone 手机号码
     * @return
     */
    @Override
    public List<User> login(String phone) {
        List<User> list = loginFrontDao.login(phone);
        return list;
    }

    /**
     * 添加
     * @param phone 手机号码
     * @return
     */
    @Override
    public int addUser(String phone) {
        int result = loginFrontDao.addUser(phone);
        return result;
    }
}
